@include('admin.public.header')
<div class="wrapper row-offcanvas row-offcanvas-left">
    <!-- Left side column. contains the logo and sidebar -->
    @include('admin.public.sidebar');

    <!-- Right side column. Contains the navbar and content of the page -->
    <aside class="right-side">                
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                所有用户
                <small><a href="{{route('admin.user.create')}}">添加用户</a></small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
                <li class="active">所有用户</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
			<div class="row">
                <div class="col-xs-12">
                    <div class="box">
                        <div class="box-header">
                            <h3 class="box-title">所有用户列表</h3>
                            <div class="box-tools">
                                <div class="input-group">
                                    <input type="text" name="table_search" class="form-control input-sm pull-right" style="width: 150px;" placeholder="Search">
                                    <div class="input-group-btn">
                                        <button class="btn btn-sm btn-default"><i class="fa fa-search"></i></button>
                                    </div>
                                </div>
                            </div>
                        </div><!-- /.box-header -->
                        <div class="box-body table-responsive no-padding">
                            <table class="table table-hover">
                                <thead>
                                    <th>用户名</th>
                                    <th>昵称</th>
                                    <th>电子邮件</th>
                                    <th>状态</th>
                                    <th>操作</th>
                                </thead>
                                <tbody>
                                <?php foreach($users as $user): ?>
                                <tr class="user-{{$user->id}}-container">
                                	<?php //dd($user); ?>
                                    <td> <img style="width:30px;height:30px" src="{{$user->avatar}}" alt="{{$user->nicename}}"> {{$user->username}}</td>
                                    <td> {{$user->nicename}} </td>
                                    <td> {{$user->email}} </td>
                                    <td> @if($user->status == 0)
                                    	<span class="label label-success">激活</span>
                                    	@else 
                                    	<span class="label label-danger">禁用</span>
                                    	@endif
                                    </td>
                                    <td>
                                    	<a href="{{route('admin.user.edit',$user->id)}}" class="btn btn-sm btn-primary">修改</a>
                                    	<a href="#" class="delete-btn user-{{$user->id}} btn btn-sm btn-danger" data-uid="{{$user->id}}">删除</a>
                                    </td>
                                </tr>
                            <?php endforeach; ?>
                                
                            </tbody></table>

                        </div><!-- /.box-body -->
                    </div><!-- /.box -->
                </div>
            </div>
        </section><!-- /.content -->
    </aside><!-- /.right-side -->
</div><!-- ./wrapper -->


        